#ifndef BASE_SERVER_HPP
#define BASE_SERVER_HPP

#include <base/TcpServer.hpp>
#include <base/log.h>
#include <base/PthreadPool.hpp>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#define MAX_EVENTS 10

class Server {
    public:
        Server(int port);
        ~Server();  
        bool Loop(); 
    private:
        bool InitServer();
        int port_;
        bool stop_;
        int epollfd_;
        int listenfd_;
        struct epoll_event ev_, events_[MAX_EVENTS];
};  

#endif